<layout name="../../../resource/master"/>

<section class="scrollable padder">

    <ul class="breadcrumb no-border no-radius b-b b-light pull-in">
        <li><a href=""><i class="fa fa-home"></i> 首页</a></li>
        <li class="active">商品管理</li>
    </ul>

    <section class="panel panel-default">
        <header class="panel-heading">
            商品列表
        </header>

        <div class="row wrapper">
            <div class="col-sm-4 m-b-xs">
                <a href="{:u('admin/goods/add')}"class="btn btn-default btn-sm">商品添加</a>
            </div>
        </div>

        <div class="table-responsive">
            <table class="table table-striped b-t b-light">
                <thead>
                <tr>
                    <th>商品ID</th>
                    <th>商品名称</th>
                    <th width="200" style="text-align: center;">价格</th>
                    <th>库存</th>
                    <th width="100">点击次数</th>
                    <th>添加时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>

                <volist name="goods" id="vo">
                <tr>

                    <td>{$vo['gid']}</td>
                    <td>{$vo['gname']}</td>
                    <td>
                        <ul>
                            <li>市场价：<del>¥{$vo['market']}</del></li>
                            <li>商城价：<span>¥{$vo['price']}</span></li>
                        </ul>
                    </td>
                    <td>{$vo['stock']}</td>
                    <td>{$vo['click']}</td>
                    <td>{$vo['time']|date="Y/m/d",###}</td>

                    <td>

                        <div class="btn-group">
                            <button data-toggle="dropdown" class="btn btn-primary btn-xs dropdown-toggle">操作 <span class="caret"></span></button>
                            <ul class="dropdown-menu dropdown-menu-right">
                                <li><a href="{:u('admin/goodsList/index',['gid'=>$vo['gid']])}">货品列表</a></li>
                                <li class="divider"></li>
                                <li><a href="{:u('edit',['gid'=>$vo['gid']])}">编辑</a></li>
                                <li class="divider"></li>
                                <li><a href="{:u('del',['gid'=>$vo['gid']])}">删除</a></li>
                            </ul>
                        </div>
                    </td>
                </tr>
                </volist>

                </tbody>
            </table>
        </div>
        <div class="pagination pagination-sm pull-right">
            <li class="disabled"><a href="javascript:;">上一页</a></li><li class="disabled"><a href="javascript:;">下一页</a></li>
        </div>

    </section>
</section>